package com.woniu.smallmedical.server.serverimpl;

import com.woniu.smallmedical.entity.Registration;
import com.woniu.smallmedical.mapper.RegistrationMapper;
import com.woniu.smallmedical.server.RegistrationServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author author
 * @create 2021-09-26-8:59
 */
@Service
public class RegistrationServerImpl implements RegistrationServer {
    @Autowired
    private RegistrationMapper registrationMapper;


    @Override
    public void AddRegistration(Registration registration) {
        registrationMapper.AddRegistration(registration);
    }

    @Override
    public List<Registration> registrations(Registration registration, String startTime, String endTime) {
        List<Registration> registrations = registrationMapper.registrations(registration, startTime, endTime);
        return registrations;
    }

    @Override
    public Registration getBySickid(int sickid) {
        Registration bySickid = registrationMapper.getBySickid(sickid);
        return bySickid;
    }

    @Override
    public void updateBySickid(int sickid, Registration registration) {
        registrationMapper.updateBySickid(sickid,registration);
    }


}
